﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShivamEMR.Model.Domain.PersonDomain;
using ShivamEMR.Model.Domain.CRMDomain;
using ShivamEMR.Model.Domain.AccountsDomain;
using System.ComponentModel.DataAnnotations;

namespace ShivamEMR.Model.Domain.InventoryDomain
{
   public class Order
    {
        #region Properties
        public Guid ID { get; set; }
        public string Code { get; set; }
        public DateTime DateAndTime { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public string Notes { get; set; } 
        #endregion

        #region ForeignKeyProperties
        public Guid PersonID { get; set; }
        public Guid VenueID { get; set; }
        public int OrderGroupID { get; set; }
        public int OrderTypeID { get; set; }
        public int OrderStatusID { get; set; }
        public Guid PaymentID { get; set; } 
        #endregion

        #region NavigationalProperties
        [ForeignKey("PersonID")]
        public virtual Person Person { get; set; }
        [ForeignKey("VenueID")]
        public virtual Venue Venue { get; set; }
        [ForeignKey("OrderGroupID")]
        public virtual OrderGroup Group { get; set; }
        [ForeignKey("OrderTypeID")]
        public virtual OrderType Type { get; set; }
        [ForeignKey("OrderStatusID")]
        public virtual OrderStatus Status { get; set; }
        [ForeignKey("PaymentID")]
        public virtual Payment Payment { get; set; }

        public virtual ICollection<OrderItem> Items { get; set; }
        #endregion


    }
}
